<HTML> 
<HEAD> 
	<TITLE>3rd Party ROBOTC Drivers</TITLE> 
<link href="tabs.css" rel="stylesheet" type="text/css"/> 
<link href="doxygen.css" rel="stylesheet" type="text/css"/> 
</HEAD> 
 
<BODY bgcolor="#ffffff" link="#000000" vlink="#000000"> 
<table width="100%" bgcolor="navy" cellspacing=0 cellpadding=1 border=0> 
<tr><td><table width="100%" bgcolor="#EEEEDD" cellspacing=0 cellpadding=3 border=0> 
<tr> 
    <td width="33%" align="left"> <img src="images/LOGO_NXT.gif" width=266 height=44 border="0" alt="Mindstorms"></td> 
    <td><b><font size="+3" color="navy">3rd Party ROBOTC Drivers</font></b></td> 
    <td align="right"> <img src="images/logo.png" width=44 height=44 border="0" alt="RobotC"></td>     
</tr> 
  <tr bgcolor="#cccc99" align="right"> 
          <td colspan=3> <font face="arial" size="-1"> [<a href=main.html>Home</a>] [<a target=_top href="https://sourceforge.net/projects/rdpartyrobotcdr/">Download</a>] [<a target=_top href="http://apps.sourceforge.net/mantisbt/rdpartyrobotcdr/my_view_page.php">Submit a bug/suggestion</a>]  [<a target=_top href="http://www.robotc.net/forums/">ROBOTC Forums</a>] [<a target=_top href="http://botbench.com">Blog</a>] [<a target=_top href="http://sourceforge.net/donate/index.php?group_id=257238">Support this project</a>]</font> </td> 
</tr> 
</table></td></tr> 
</table> 
<!-- Generated by Doxygen 1.7.2 -->
<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>Angle Sensor<br/>
<small>
[<a class="el" href="group___hi_technic.html">HiTechnic</a>]</small>
</h1>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="files"></a>
Files</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hitechnic-angle_8h.html">hitechnic-angle.h</a></td></tr>

<p><tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>HiTechnic Angle Sensor driver. </p>
<br/></td></tr>
</p>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga573c0bc8357f5b793998bfd304b09881">HTANG_I2C_ADDR</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga72829cc45302536342461483351c4038">HTANG_CMD_REG</a>&#160;&#160;&#160;0x41</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga0748f360b33f41995982c6e14d5e4564">HTANG_OFFSET</a>&#160;&#160;&#160;0x42</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga4d93dcb099e07d8c7a1c2566171ebef3">HTANG_ANG2</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga625dc294485148142640d76d529523ae">HTANG_ANG1</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#gaee0fed967e6bbc918f40f1d3fcbe61ed">HTANG_ACC_ANG_B4</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga499755c9d5785adf7ec324634aad4b00">HTANG_ACC_ANG_B3</a>&#160;&#160;&#160;0x03</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga7132c093961b3072a32bbecfc533e77f">HTANG_ACC_ANG_B2</a>&#160;&#160;&#160;0x04</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga5f54a24451cbcd59f4f05be96f476260">HTANG_ACC_ANG_B1</a>&#160;&#160;&#160;0x05</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga4cce8cc05226064d7e1c1f0df11b469e">HTANG_RPM_H</a>&#160;&#160;&#160;0x06</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#gae746bb0db371f850b6ef8871abce8987">HTANG_RPM_L</a>&#160;&#160;&#160;0x07</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#gacbcaa28d0879f9f84c3b1f6cf65d13a8">HTANG_CMD_MEASURE</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#gaabb51c8c40e1707917845b9c293d5df5">HTANG_CMD_RST_ANG</a>&#160;&#160;&#160;0x43</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#gae46b586b162c818b597ffc978739c99c">HTANG_CMD_RST_ACC_ANG</a>&#160;&#160;&#160;0x52</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga8220498ae68e871590405e7ba4a6f958">HTANGreadAngle</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga4838f3d2d891aaccdb9c0b03405e4b30">HTANGreadAccumulatedAngle</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#gad9b5136fc6072f60a802e9a52a797000">HTANGreadRPM</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga3420e803070ec8b60b3b97ef0218393f">HTANGresetAngle</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga1d131342d75547f87f728e1cc150cedd">HTANGresetAccumulatedAngle</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#gaaf6bb1e4b487a5198676456e0668d970">_HTANGsendCommand</a> (tSensors link, byte command)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga6ef057d5e86d8c45f7642340a7698de6">HTANGreadAngle</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#gabe94539aac94463a613d3a2cd81df503">HTANGreadAccumulatedAngle</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga9e184dffeea9791ada04464d054c9110">HTANGreadRPM</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__htsmux.html#gae535601c6d1a8544ed23e79d545ce45c">tConfigParams</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga334bee4910c9aae5902fd86b91bdf45f">HTANG_config</a> = {HTSMUX_CHAN_I2C, 8, 0x02, 0x42}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#ga22546557f547a921b82fad8cb7a998ff">HTANG_I2CRequest</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htang.html#gac98a4261c912dc49ab40d7a92746d6eb">HTANG_I2CReply</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>HiTechnic Angle Sensor </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ga5f54a24451cbcd59f4f05be96f476260"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_ACC_ANG_B1" ref="ga5f54a24451cbcd59f4f05be96f476260" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_ACC_ANG_B1&#160;&#160;&#160;0x05</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>32 bit accumulated angle 1st byte </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00054">54</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga7132c093961b3072a32bbecfc533e77f"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_ACC_ANG_B2" ref="ga7132c093961b3072a32bbecfc533e77f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_ACC_ANG_B2&#160;&#160;&#160;0x04</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>32 bit accumulated angle 2nd byte </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00053">53</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga499755c9d5785adf7ec324634aad4b00"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_ACC_ANG_B3" ref="ga499755c9d5785adf7ec324634aad4b00" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_ACC_ANG_B3&#160;&#160;&#160;0x03</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>32 bit accumulated angle 3rd byte </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00052">52</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaee0fed967e6bbc918f40f1d3fcbe61ed"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_ACC_ANG_B4" ref="gaee0fed967e6bbc918f40f1d3fcbe61ed" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_ACC_ANG_B4&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>32 bit accumulated angle 4th byte </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00051">51</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga625dc294485148142640d76d529523ae"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_ANG1" ref="ga625dc294485148142640d76d529523ae" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_ANG1&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Current angle (1 deg adder) </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00050">50</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga4d93dcb099e07d8c7a1c2566171ebef3"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_ANG2" ref="ga4d93dcb099e07d8c7a1c2566171ebef3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_ANG2&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Current angle (2 deg increments) </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00049">49</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="gacbcaa28d0879f9f84c3b1f6cf65d13a8"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_CMD_MEASURE" ref="gacbcaa28d0879f9f84c3b1f6cf65d13a8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_CMD_MEASURE&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Normal angle measurement mode </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00059">59</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga72829cc45302536342461483351c4038"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_CMD_REG" ref="ga72829cc45302536342461483351c4038" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_CMD_REG&#160;&#160;&#160;0x41</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Command register </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00045">45</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="gae46b586b162c818b597ffc978739c99c"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_CMD_RST_ACC_ANG" ref="gae46b586b162c818b597ffc978739c99c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_CMD_RST_ACC_ANG&#160;&#160;&#160;0x52</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Resets the accumulated angle </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00061">61</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaabb51c8c40e1707917845b9c293d5df5"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_CMD_RST_ANG" ref="gaabb51c8c40e1707917845b9c293d5df5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_CMD_RST_ANG&#160;&#160;&#160;0x43</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Resets 0 position to current shaft angle, non-volatile setting </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00060">60</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga573c0bc8357f5b793998bfd304b09881"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_I2C_ADDR" ref="ga573c0bc8357f5b793998bfd304b09881" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_I2C_ADDR&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>HTCS2 I2C device address </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00044">44</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga0748f360b33f41995982c6e14d5e4564"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_OFFSET" ref="ga0748f360b33f41995982c6e14d5e4564" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_OFFSET&#160;&#160;&#160;0x42</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Offset for data registers </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00046">46</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga4cce8cc05226064d7e1c1f0df11b469e"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_RPM_H" ref="ga4cce8cc05226064d7e1c1f0df11b469e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_RPM_H&#160;&#160;&#160;0x06</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>16 bit rpms, high byte </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00055">55</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="gae746bb0db371f850b6ef8871abce8987"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_RPM_L" ref="gae746bb0db371f850b6ef8871abce8987" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HTANG_RPM_L&#160;&#160;&#160;0x07</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>16 bit rpms, low byte </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00056">56</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gaaf6bb1e4b487a5198676456e0668d970"></a><!-- doxytag: member="hitechnic&#45;angle.h::_HTANGsendCommand" ref="gaaf6bb1e4b487a5198676456e0668d970" args="(tSensors link, byte command)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool _HTANGsendCommand </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">byte&#160;</td>
          <td class="paramname"> <em>command</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Send a command to the sensor</p>
<p>Note: this is an internal function and should not be called directly. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTANG port number </td></tr>
    <tr><td class="paramname">command</td><td>the command to be sent to the sensor </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00241">241</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="gabe94539aac94463a613d3a2cd81df503"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANGreadAccumulatedAngle" ref="gabe94539aac94463a613d3a2cd81df503" args="(tMUXSensor muxsensor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long HTANGreadAccumulatedAngle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the accumulated angle (signed 32 bit value) </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>current angle or -1 if an error occurred. </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00150">150</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga4838f3d2d891aaccdb9c0b03405e4b30"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANGreadAccumulatedAngle" ref="ga4838f3d2d891aaccdb9c0b03405e4b30" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long HTANGreadAccumulatedAngle </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the accumulated angle (signed 32 bit value) </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTANG port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>current angle or -1 if an error occurred. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-angle-_s_m_u_x-test1_8c-example.html#a2">hitechnic-angle-SMUX-test1.c</a>, and <a class="el" href="hitechnic-angle-test1_8c-example.html#a3">hitechnic-angle-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00127">127</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga8220498ae68e871590405e7ba4a6f958"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANGreadAngle" ref="ga8220498ae68e871590405e7ba4a6f958" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int HTANGreadAngle </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the current angle </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTANG port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>current angle or -1 if an error occurred. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-angle-_s_m_u_x-test1_8c-example.html#a1">hitechnic-angle-SMUX-test1.c</a>, and <a class="el" href="hitechnic-angle-test1_8c-example.html#a2">hitechnic-angle-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00087">87</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga6ef057d5e86d8c45f7642340a7698de6"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANGreadAngle" ref="ga6ef057d5e86d8c45f7642340a7698de6" args="(tMUXSensor muxsensor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int HTANGreadAngle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the current angle </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>current angle or -1 if an error occurred. </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00107">107</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga9e184dffeea9791ada04464d054c9110"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANGreadRPM" ref="ga9e184dffeea9791ada04464d054c9110" args="(tMUXSensor muxsensor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int HTANGreadRPM </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the rpm that the shaft is currently rotating at </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the current rpm of the shaft or -1 if an error occurred. </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00194">194</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="gad9b5136fc6072f60a802e9a52a797000"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANGreadRPM" ref="gad9b5136fc6072f60a802e9a52a797000" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int HTANGreadRPM </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the rpm that the shaft is currently rotating at </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTANG port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the current rpm of the shaft or -1 if an error occurred. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-angle-_s_m_u_x-test1_8c-example.html#a3">hitechnic-angle-SMUX-test1.c</a>, and <a class="el" href="hitechnic-angle-test1_8c-example.html#a4">hitechnic-angle-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00173">173</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga1d131342d75547f87f728e1cc150cedd"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANGresetAccumulatedAngle" ref="ga1d131342d75547f87f728e1cc150cedd" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool HTANGresetAccumulatedAngle </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Reset the accumulated angle </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTANG port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-angle-test1_8c-example.html#a1">hitechnic-angle-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00228">228</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga3420e803070ec8b60b3b97ef0218393f"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANGresetAngle" ref="ga3420e803070ec8b60b3b97ef0218393f" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool HTANGresetAngle </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Reset the 0 position to the current shaft angle.<br/>
 Note: this will also reset the accumulated angle counter </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTANG port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-angle-test1_8c-example.html#a0">hitechnic-angle-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00218">218</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="ga334bee4910c9aae5902fd86b91bdf45f"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_config" ref="ga334bee4910c9aae5902fd86b91bdf45f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__htsmux.html#gae535601c6d1a8544ed23e79d545ce45c">tConfigParams</a> <a class="el" href="group__htang.html#ga334bee4910c9aae5902fd86b91bdf45f">HTANG_config</a> = {HTSMUX_CHAN_I2C, 8, 0x02, 0x42}</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold SMUX config data for sensor </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00075">75</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="gac98a4261c912dc49ab40d7a92746d6eb"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_I2CReply" ref="gac98a4261c912dc49ab40d7a92746d6eb" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> <a class="el" href="group__htang.html#gac98a4261c912dc49ab40d7a92746d6eb">HTANG_I2CReply</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold I2C reply data </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00079">79</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga22546557f547a921b82fad8cb7a998ff"></a><!-- doxytag: member="hitechnic&#45;angle.h::HTANG_I2CRequest" ref="ga22546557f547a921b82fad8cb7a998ff" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> <a class="el" href="group__htang.html#ga22546557f547a921b82fad8cb7a998ff">HTANG_I2CRequest</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold I2C command data </p>

<p>Definition at line <a class="el" href="hitechnic-angle_8h_source.html#l00078">78</a> of file <a class="el" href="hitechnic-angle_8h_source.html">hitechnic-angle.h</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Mar 13 2013 19:56:44 for ROBOTC Drivers by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
